Skip to content

test: should sync form input changes with URL query parameters - #1141

Open
Shahar17452312 wants to merge 10 commits into
hasadna:mainfrom
Shahar17452312:test_URL_timeline
Open

test: should sync form input changes with URL query parameters#1141
Shahar17452312 wants to merge 10 commits into
hasadna:mainfrom
Shahar17452312:test_URL_timeline

Conversation

@Shahar17452312

@Shahar17452312 Shahar17452312 commented Jun 3, 2025

Copy link
Copy Markdown
Collaborator

Test url timeline-create test with name: Should sync form input changes with URL query parameters

Resolving #1109

note:
The test on line 173 is currently failing because when the URL changes, the application reverts to the latest route.
I verified this behavior in the UI as well — if you fill in all the inputs and then manually change one of them in the URL, the app navigates back to the last route state.

screenshot:

Screenshot 2025-06-03 232915

@Shahar17452312
Shahar17452312 requested a review from NoamGaash as a code owner June 3, 2025 20:31
@github-actions

github-actions Bot commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

@NoamGaash NoamGaash changed the title Test url timeline-create test with name: Should sync form input changes with URL query parameters test: should sync form input changes with URL query parameters Jun 4, 2025
@Shahar17452312

Copy link
Copy Markdown
Collaborator Author

It is my first time writing to open source project, hope it's ok. Please let me know if there is any problem :)
@NoamGaash

@NoamGaash NoamGaash left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@NoamGaash

Copy link
Copy Markdown
Member

Seems like some of the tests are failing - we can update the branch after merging #1136 to see if it helps

@Shahar17452312

Copy link
Copy Markdown
Collaborator Author

The test still fails after the merge.
Still the same problem

@NoamGaash
NoamGaash requested a review from AvivAbachi as a code owner July 12, 2025 07:51
@AvivAbachi

Copy link
Copy Markdown
Collaborator

@NoamGaash @Shahar17452312
The problem is not in the test.
The URL query params don't sync after init MainRoute.tsx and SearchContext.ts.

@tatish86

tatish86 commented Oct 30, 2025

Copy link
Copy Markdown

@Shahar17452312 @AvivAbachi Hi,
I'm trying lt learn a bit about the tests and I looken into this - it fails for me in the comparing of timestamp.
I debbugged it and saw the page is loaded twice so the timestamp changed (it is not only the date but the full timestamp so it matters).
My question is why not be active and set the time as well? and not rely on setting the page clock with: page.clock.setSystemTime(getPastDate()).

@AvivAbachi

AvivAbachi commented Oct 30, 2025

Copy link
Copy Markdown
Collaborator

@tatish86
I hope it answers your question.

  • The page renders twice because React is in strict mode <React.StrictMode>
  • We are using page.clock.setSystemTime(getPastDate()) to apply mock data on same time.
  • He is trying to test whether changing the URL alters the request, but it is not working.
  • The URL is set by session storage > URL parameters > current system time in MainRoute.tsx.

@arielvino

Copy link
Copy Markdown
Collaborator

@claude compare this PR against current main

@claude

claude Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

@arielvino

Copy link
Copy Markdown
Collaborator

@claude

@claude

claude Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error after 2m 37s —— View job


Comparing PR #1141 against current main

🤖 I am an AI agent (Claude), responding to @arielvino's request.

  • Fetch full history and diff the branch against origin/main
  • Read the test added in tests/timeline.spec.ts
  • Check whether the app code the test depends on still exists on main (MainRoute.tsx, SearchContext, timeline page)
  • Run the test empirically to see the current failure (not just repeat what earlier comments said)
  • Report: what drifted, whether the test still fails, and the root cause
    · branch test_URL_timeline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants